International Text Handling
For text input using Roman and other 1-byte script systems, the normal event-
handling mechanism of OpenDoc is sufficient; your part receives keystroke events, converts them to characters in memory, and draws them as text glyphs on the screen.To support text input in 2-byte script systems such as Chinese, Japanese, and Korean, OpenDoc on the Mac OS platform uses the Script Manager, Text Services Manager, and Dictionary Manager. Your parts can use these system software facilities to offer the user both bottomline input and the extra convenience of inline input.
The Script Manager, the Text Services Manager, and the Dictionary Manager are all described in detail in Inside Macintosh: Text. This section summarizes only how your part must use the Text Services Manager differently than a conventional application does.
Because it shares application responsibilities with the document shell and other parts of OpenDoc, your part does both less and more than a conventional application when it uses the Mac OS Text Services Manager.
- OpenDoc itself takes care of basic initialization and event handling. It calls the
InitTSMAwareApplication
,CloseTSMAwareApplication
,TSMEvent
, andSetTSMCursor
functions.- OpenDoc does not provide support for any other international text-handling facilities, such as the TSMTE extension. To use such an extension, your part is responsible for checking for its existence and accessing it.
- To support inline input, your part needs to provide the required Apple event handlers through a semantic interface extension, as described in Chapter 9, "Semantic Events and Scripting." Because it is a part, it cannot directly install Apple event handlers in the same manner as a conventional application.
- Whenever a part loses the keystroke focus, OpenDoc calls the Text Services Manager function
UseInputWindow
to reestablish the default convention of bottomline input (that is, input using an input window). Therefore, if your part wants to use inline input, it must itself callUseInputWindow
every time it receives the keystroke focus, to override that default and specify inline input.- Like a conventional application, your part makes normal text-processing calls to the Text Service Manager, such as
ActivateTSMDocument
,FixTSMDocument
, andDeactivateTSMDocument
.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help